from core.item import Item
from core.action import Action
from core.support import set_cutscene

class Dumbbells(Item):
    def __init__(self):
        Item.__init__(self, "dumbbells")    # do basic initialization for every item
        
        # build list of actions
        self.add_action(PumpIron)
    
    def get_description(self):
            return "heavy dumbbells"
        
    def get_image(self):
        return 'images/items/dumbbell.jpg'

# define actions for this item

class PumpIron(Action):
    def __init__(self):
        Action.__init__(self, "pump_iron")    # do basic initialization for every action
    
    # this method gets called when action executed.  can be overridden in subclass
    def do_action(self,game,room,request):
        game.get_player().get_pumped()
        set_cutscene("MacGyver feels extra buff and can carry an additional item.")
        return
    
    # should this action be available to player?
    def is_enabled(self):
        return True
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Pump Iron"
    
    # if omitted in your action we return "post"
    def get_method(self):
        return "get"